/*
 * BuiltInCommand.h
 *
 *  Created on: May 26, 2011
 *      Author: Stijn, Bart, Dave
 */

#ifndef BUILTINCOMMAND_H_
#define BUILTINCOMMAND_H_

#include <vector>
#include <dirent.h>
#include <stdlib.h>
#include <iostream>
#include <stdio.h>
#include <string.h>

#include <stdint.h>
#include <unistd.h>
#include <libgen.h>
#include <signal.h>
#include <fcntl.h>
#include <assert.h>
#include <sys/wait.h>

class BuiltInCommand {
	public:
		BuiltInCommand();
		void executeBuildIn(const char*, int, char* const *);
		virtual ~BuiltInCommand();

		void setPids(std::vector<int>*);

	private:
		std::vector<int>* backgroundPids;

		void execPrintenv(int, char* const *);
		int execCd(int, char* const *);
		int nice(int, char* const *);
		int jobs();
		std::string getProccesInfo(int, int);
		void wait(pid_t);

		std::string intToString(int);
};
#endif /* BUILTINCOMMAND_H_ */
